package com.leanin.form.model.response.followform;

import com.leanin.form.model.response.ResultCode;

/**
 * @author CPJ.
 * @date 2019/6/18.
 * @time 19:28.
 */
public enum FollowFormCode implements ResultCode {
    SUCCESS(true, 200, "操作成功！"),

    FORM_NAME_REPETITION(false, 500, "随访表单名称重复,请重新填写随访表单名称！"),

    FORM_NAME_NULL(false, 501, "随访表单名称为空,请填写随访表单名称"),

    FORM_CONTENT_NULL(false, 502, "随访表单内容为空，请填写随访表单内容"),
    FORM_NAME_LENGTH_ERROR(false,501,"随访表单名称超过50字,请重新填写随访表单名称"),
    FORM_TITLE_LENGTH_ERROR(false,501,"随访表单头超过150字,请重新填写随访表单头"),
    FORM_END_LENGTH_ERROR(false,501,"随访表单尾超过150字,请重新填写随访表单尾"),

    FORM_NOT_EXIST(false, 503, "随访表单不存在!");

    //    private static ImmutableMap<Integer, CommonCode> codes ;
    //操作是否成功
    boolean success;
    //操作代码
    int status;
    //提示信息
    String message;

    private FollowFormCode(boolean success, int status, String message) {
        this.success = success;
        this.status = status;
        this.message = message;
    }

    @Override
    public boolean success() {
        return success;
    }

    @Override
    public int status() {
        return status;
    }

    @Override
    public String message() {
        return message;
    }
}
